---
layout: docs
page_title: 'nomad volume detach command reference'
description: |
  The `nomad volume detach` command detaches external storage volumes with Container Storage Interface (CSI) plugins.
---

# `nomad volume detach` command reference

The `volume detach` command detaches external storage volumes with Nomad's
[Container Storage Interface (CSI)][csi] support.

## Usage

```plaintext
nomad volume detach [options] [volume] [node]
```

The `volume detach` command requires two arguments, specifying the ID of the
volume to be detached and the node to detach it from. Detaching will fail if
the volume is still in use by an allocation.

Note that you can use a node ID prefix just as you can with other Nomad
commands, but if the node has been garbage collected, you may need to pass the
full node ID.

When ACLs are enabled, this command requires a token with the
`csi-write-volume` and `csi-read-volume` capabilities for the volume's
namespace.

## General options

@include 'general_options.mdx'

[csi]: https://github.com/container-storage-interface/spec
